package Model

import (
	_ "github.com/go-sql-driver/mysql"
	_"github.com/jinzhu/gorm"
)

type SharesOldInfo struct {
	//gorm.Model
	Id uint
	Code int
	Date string
	Open float64
	Close float64
	High float64
	Low float64
	Volume float64
}



type SharesNowInfo struct {
	//gorm.Model
	Id uint
	Code int
	Name string
	ChangePercent float64
	Trade float64
	Open float64
	High float64
	Low float64
	Settlement float64
	Volume float64
	TurnOverRatio float64
	Amount float64
	Pb float64
	Mktcap float64
	Nmc float64
}

type InformationWorker interface {
	GetInfo()
	Trans()
	SaveInfo()
}


type Controller interface {
	Start()
}

type Resulter interface {

}

//func init(){
//	db, err := gorm.Open("mysql", "root:cxx15755599659@/Ticket?charset=utf8&parseTime=True&loc=Local")
//
//	if err != nil {
//		panic("failed to connect database")
//	}
////	defer db.Close()
////	db.AutoMigrate(&SharesOldInfo{})
//}